<%@page import="com.demoweb.model.dto.Membership"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
   
<div id="login" class="boxed">
      <h2 class="title">회원 정보</h2>
      <div class="content">     
      
      <% if(session.getAttribute("loginuser") == null)  {%>
      
		<form id="loginform" method="post" action="/demoweb/flappy/account/login.action">  
          <fieldset>
          <legend>Login</legend>
          <label for="inputtext1">회원 ID:</label>
          <input id="inputtext1" type="text" name="memberId" value="" />
          <br />
          <label for="inputtext2">비밀번호:</label>
          <input id="inputtext2" type="password" name="passwd" value="" />
          <input id="inputsubmit1" type="submit" name="inputsubmit1" value="Login" />
          <p><a href="/demoweb/member/registerform.action">회원가입</a></p>
          </fieldset>
        </form>
	 <%
	 	} else {
	 %>	 
	 	<form id="loginform" method="post" action="/demoweb/flappy/account/login.action">  
          <fieldset>
          <legend>Login</legend>
          <br />
          	 <% 	Membership member = (Membership)session.getAttribute("loginuser");	 %>
			 <h3 style="font-size: 18px;color: red;"> <%= member.getMemberId() %> 님 환영합니다. </h3>
			 <br />
       	 <a href="/demoweb/flappy/account/logout.action"> 로그아웃</a>
			 <% }  %>      
          </fieldset>
        </form>
      </div>
    </div>   